-
Notifications
You must be signed in to change notification settings - Fork 18
Use ruff Python formatter #150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
❌ Deploy Preview for scrc-coding-guidelines failed.
|
Hi @x0rw -- is this still a draft or ready for review? I saw a couple of unticked boxes |
80d2e4c
to
e3ea946
Compare
Hi @PLeVasseur, let me know what you think. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @x0rw -- thanks for the updates! I left a couple of comments if you could take a look
pyproject.toml
Outdated
@@ -19,3 +19,35 @@ members = ["builder"] | |||
|
|||
[tool.uv.sources] | |||
builder = { workspace = true } | |||
|
|||
[tool.ruff] | |||
# line-length = 88 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we remove some of the commented out code such as this line?
Or are you considering adding them back in and wanted to check with folks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well it can be removed, we can't enfore line length because we have templates with long one-line strings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could make exceptions for those and enforce it elsewhere?
pyproject.toml
Outdated
"ruff>=0.12.3", | ||
] | ||
|
||
# [tool.ruff.mccabe] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious on if this is common and/or recommended as a metric for Python code when using ruff.
Did you have some thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
max-complexity field under this ruff.mccabe
, can be used to fine-tune the strictness of the cyclomatic complexity checks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But i think we don't need to go that far.
Resolves #146